cc.Class({
    extends: cc.Component,

    properties: {
        fangka1: cc.Label,
        fangka2: cc.Label,
    },

    // use this for initialization
    onLoad: function () {
        this.creatround = 4;
        this.creatpay = 0;
        this.creatscore = 2;
        this.hupai = 0;//0 通用 1 自摸胡
        this.hunpai = 0;// 0不带混  1 带混
        this.chi = 0;// 0不带吃 1带吃
        this.Feng = 0;//0带风套  1不带风套
        this.Lack = 0;//0带缺门  1不带缺门
        this.chooseShaiPai = 0;//0晒牌  1不带晒牌
        this.chooseKaPai = 0;//0卡牌   1不卡牌
    },

    /*必须带的方法*/
    getConfigs: function () {
        return {
            creatround: this.creatround,
            creatpay: this.creatpay,
            creatscore: this.creatscore,
            hupai: this.hupai,
            hunpai: this.hunpai,
            chi: this.chi,
            Feng: this.Feng,
            Lack: this.Lack,
            chooseShaiPai: this.chooseShaiPai,
            chooseKaPai: this.chooseKaPai,
        }
    },

    onSelectToggle(e, d) {
        if (d == 1) {
            this.creatround = 4;
        } else if (d == 2) {
            this.creatround = 8;
        } else if (d == 3) {
            this.creatpay = 0;
        } else if (d == 4) {
            this.creatpay = 1;
        } else if (d == 5) {
            this.hupai = 0;
        } else if (d == 6) {
            this.hupai = 1;
        }
        else if (d == 7) {
            this.hunpai = 0;
        }
        else if (d == 8) {
            this.hunpai = 1;
        }
        else if (d == 9) {
            this.Feng = 0;
        }
        else if (d == 10) {
            this.Feng = 1;
        }
        else if (d == 11) {
            this.Lack = 0;
        }
        else if (d == 12) {
            this.Lack = 1;
        }
        else if (d == 13) {
            this.chooseShaiPai = 0;
        }
        else if (d == 14) {
            this.chooseShaiPai = 1;
        }
        else if (d == 15) {
            this.chooseKaPai = 0;
        }
        else if (d == 16) {
            this.chooseKaPai = 1;
        }
        cc.ll.AudioMgr.playDefaultBtn();
    },


    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
